<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>demo</title>
    <link rel="stylesheet" href="../node_modules/weui/dist/style/weui.min.css">
    <script type="text/javascript" src="https://res.wx.qq.com/open/libs/weuijs/1.1.1/weui.min.js"></script>
</head>
<body>
    <div id="form">
    <div class="weui-cells weui-cells_form">
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">qq</label></div>
            <div class="weui-cell__bd">
                <input type="text" class="weui-input" required pattern="REG_IDNUM" placeholder="输入你的身份证号码" emptyTips="请输入身份证号码" notMatchTips="请输入正确的身份证号码">
            </div>
            <div class="weui-cell_ft">
                <i class="weui-icon-warn"></i>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">qq</label></div>
            <div class="weui-cell__bd">
                <input type="tel" class="weui-input" required pattern="[0-9]{11}" placeholder="输入你现在的手机号" emptyTips="请输入手机号" notMatchTips="请输入正确的手机号">
            </div>
            <div class="weui-cell_ft">
                <i class="weui-icon-warn"></i>
            </div>
        </div>
    </div>
    <div class="weui-btn-area">
        <a class="weui-btn weui-btn_primary js_btn" href="javascript:hello()">确定</a>
    </div>
    </div>
    <script type="text/javascript">
        weui.form.checkIfBlur('#form', {
            regexp: {
                IDNUM: /(?:^\d{15}$)|(?:^\d{18}$)|^\d{17}[\dXx]$/,
                VCODE: /^.{4}$/
            }
        });   
    </script>
</body>
</html>